<%@tag import="itsm.isperp.control.form.process.WorkflowProcesser"%>
<%@ tag language="java" pageEncoding="UTF-8" description="jqGrid 控件."
	trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@taglib prefix="s" uri="http://www.springframework.org/tags"%>
<%@ attribute name="readonly" required="false" rtexprvalue="true"
	type="java.lang.Boolean" description="默认false"%>
<c:set var="readonly" value="${readonly eq true?true:false }"></c:set>

<div class="box tabbedBox tabbedBoxFixed">
	<div class="header">
		<ul>
			<li class="current"><a href="#basicInfo">问题基本信息</a>
			</li>

			 

			<li><a href="#relationProcess">关联流程（<label
					id="relationProcessCount" style="color:red"></label>）</a>
			</li>
			<li><a href="#cusProblemMessage">相关消息（<label
					id="cusProblemMessageCount" style="color:red"></label>）</a>
			</li>
		</ul>
		<h2>&nbsp;</h2>
	</div>
	<div style="padding:0" class="content tabbed">
		<div id="basicInfo">
			<div class="box no-border">
				<div class="header">
					<h3>
						问题编号：${model.code}&nbsp;&nbsp;状态：<span class="important-info">${model.status}</span>
					</h3>
				</div>
			</div>
			<div class="box" style="overflow: hidden">

				<s:eval
					expression="T(itsm.isperp.control.form.process.WorkflowProcesser).renrder(model.processId)"
					var="processerHtml" />
				${processerHtml }
			</div>
			
			<jsp:doBody />
		</div>

		 


		<div id="relationProcess">
			<isperp:processRelation businessKey="${model.id }" readonly="${readonly }"
				processKey="problemProcess" projectIdControl="projectId"
				showTotalControl="relationProcessCount"></isperp:processRelation>

		</div>
		<div id="cusProblemMessage">
			<div class="box no-border">

				<isperp:grid
					url="app/message/listBySourceId?all=1&sourceId=${model.id }"
					showSearchbar="false" gridId="userProblemMessageGrid"
					cusViewUrl="app/message/view" cusDialogSize="normal"
					showToolbar="true"
					loadComplete=" $('#cusProblemMessageCount').text( userProblemMessageGrid.jqGrid.getGridParam('records'));">
					<jsp:attribute name="toolbar">
						（备注：消息发送后不会即时显示在列表中）<isperp:button id="userProblemMessageCreate"
							icon="icon-plus" text="发送消息" cssClass="button  nui-mainbtn"
							onclick="isperp.openDialog({contentUrl:'app/message/sender/sendEdit?sourceId=${model.id }'})"></isperp:button>
					</jsp:attribute>
					<jsp:body>
						<isperp:column name="id" title="id" hidden="true"></isperp:column>
						<isperp:column name="sender_name" title="发送人" width="80">
						</isperp:column>
						<isperp:column name="receiver_name" title="接收人" width="80">
						</isperp:column>
						<isperp:column name="content" title="内容" width="300">
						</isperp:column>
						<isperp:column name="message_type" title="发送方式" width="70"
							isFormatterFun="true"
							formatter="if('LEAVEMSG'==cellvalue){return '留言';}else{return cellvalue;}">
						</isperp:column>
						<isperp:column name="create_date" title="发送时间" width="110">
						</isperp:column>
				</jsp:body></isperp:grid>
			</div>
		</div>
	</div>
</div>